home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000002_icon-group-sender_Thu Aug 15 08:53:15 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g7FFrBA27056
  4.     for icon-group-addresses; Thu, 15 Aug 2002 08:53:11 -0700 (MST)
  5. Message-Id: <200208151553.g7FFrBA27056@baskerville.CS.Arizona.EDU>
  6. From: Hrvoje Blazevic <hrvoje@despammed.com>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: What about "Expressions?" (was Re: Icon Wish List)
  9. Date: Thu, 15 Aug 2002 14:25:53 +0200
  10. X-Complaints-To: abuse@hinet.hr
  11. User-Agent: Pan/0.11.2 (Unix)
  12. X-Comment-To: "Christopher Browne" <cbbrowne@acm.org>
  13. To: icon-group@cs.arizona.edu
  14. Errors-To: icon-group-errors@cs.arizona.edu
  15. Status: RO
  16.  
  17. On Thu, 15 Aug 2002 02:16:33 +0200, Christopher Browne wrote:
  18.  
  19. > This is indeed an interesting question.
  20. > It _may_ be that the notion of "expression-based" being referenced is
  21. > that control structures work on the expression in a bit of a different
  22. > way than in Algol-descended languages.
  23. > But it's not clear.
  24. > Terse is definitely a "hype-heavy, theory-light" language; in the
  25. > absence of more documentation, it's not obvious what it's doing that is
  26. > similar to Icon that _isn't_ similar to C or Modula-3.
  27. > And I think the likelihood of Icon "launching" because of being regarded
  28. > as a "more low level language" as being, um, rather remote. Terse hasn't
  29. > been taking the world by storm any more than FORTH has.
  30. > But I'd be curious as to what the definition of "Expressions" is
  31. > supposed to be, in this context.
  32.  
  33.  
  34. I must be careful here, lest someone from this group answers; " If
  35. you can't speak English", how can you understand what an expression
  36. is".
  37.  
  38. Anyway, I'm not very interested in theoretical definition of what an
  39. expression means. The reaction was just to the statement that: The
  40. only other computer language that I know of which uses expressions is
  41. Terse (www.terse.com) an expression-based assembly language.
  42.  
  43. Now, I don't know terse (never heard of it), but I do know that Scheme
  44. is an expression based language. Everything (except definition) is an
  45. expression - even assignment is.
  46.  
  47. I guess that the important difference here is that most imperative
  48. languages (except Icon) work with statements. Scheme and the rest of
  49. FP languages work with expressions.
  50.  
  51. To quote an example from Graphics Programming in Icon; p9
  52.  
  53. In Pascal, the following line is a statement:
  54.  
  55. if switch = on then write("on") else write("off");
  56.  
  57. Icon is different in this regard. Icon has no statements, only expressions.
  58. ...
  59.  
  60. write(if switch = on then "on" else "off")
  61.  
  62. end quote.
  63.  
  64. Well, the same is true for Scheme (or Lisp, and other FP languages in general)
  65.